package com.onlineexam.controller;

import com.onlineexam.bean.TianKong;
import com.onlineexam.util.JsonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin("*")
@RestController
@RequestMapping("/tiankong")
public class TianKongController {
    @Resource
    private com.onlineexam.mapper.TianKongMapper TianKongMapper;

    @RequestMapping("/list") //选择题列表
    public JsonResult TiankongList() {
        List<TianKong> list = TianKongMapper.list();
        JsonResult result = new JsonResult(true, 200, list, "");
        return result;
    }
}
